package com.vcredit.creditcat.persistence.base;

import com.vcredit.creditcat.model.CustProductApply;
import com.vcredit.framework.pagination.DefaultCriteria;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

public interface CustProductApplyMapper {
	void insert(CustProductApply obj);

	void update(CustProductApply obj);

	List<CustProductApply> findAll();

	List<CustProductApply> find(CustProductApply obj);

	CustProductApply findById(Long id);

	List<CustProductApply> findByPage(DefaultCriteria criteria);

	List<Map<String,Object>> applySuccessList();

	long findHasResultByCustAndProducts(Map<String, Object> params);
	long findHasResultByCustAndProduct(Map<String, Object> params);
	CustProductApply findByCustAndProduct(@Param("custId")Long custId, @Param("productId")long productId);

	List<CustProductApply> findByCustAndAuditResults(@Param("custId") Long custId,
			@Param("auditResults")List<Integer> auditResults);

	
	String sdGetDeviceID(@Param("custId")Long custId);
	
	String sdGetCreditAmt(@Param("custId")Long custId, @Param("productId")long productId);
	
	
}
